﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<VCC.Site.ViewModels.ArticleIndexViewModel>" %>

<%@ Import Namespace="VCC.Lib.Paging" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%=Model.LanguageID == 1 ? Model.ArticleCategory.Name : Model.ArticleCategory.EnglishName%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="main_content">
        <div class="col_l">
            <form name="artcleForm" method="post" action="/Article">
            <div class="content-new">
                <h2><%=Model.LanguageID == 1 ? Model.ArticleCategory.Name : Model.ArticleCategory.EnglishName%></h2>
                <div id="list-cate">
                    <div class="pad">
                        <%if (Model.Articles.Count() > 0)
                          {%>
                        <div class="item-cate-first">
                            <div class="list-bor">
                                <div style="float: left" class="img-first">
                                    <a href="/Article/Details/<%=Model.Articles[0].ID%>">
                                        <% string firstimgPath = (Model.Articles[0].ImagePath != null && Model.Articles[0].ImagePath != string.Empty) ? Model.Articles[0].ImagePath : VCC.Lib.Common.Globals.DefaultLogo; %>
                                        <img width="214px" height="150px" alt="<%=Model.Articles[0].Title%>" title="<%=Model.Articles[0].Title%>" src="<%=firstimgPath%>">
                                    </a>
                                </div>
                                <div style="width: 445px; overflow: hidden" class="art-content">
                                    <div class="title-less-top">
                                        <h3>
                                            <a href="/Article/Details/<%=Model.Articles[0].ID%>">
                                                <%=Model.Articles[0].Title%></a>
                                        </h3>
                                    </div>
                                    <div class="date date-first">
                                        <%=Model.Articles[0].AddDate != null ? (Model.Articles[0].AddDate.ToString("hh:mm") + "&nbsp;|&nbsp;" + Model.Articles[0].AddDate.ToString("dd/MM/yyyy")) : string.Empty%></div>
                                    <div class="lead">
                                        <%=Html.Encode(Model.Articles[0].Summary)%>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clear">
                        </div>
                        <%if (Model.Articles.Count() > 1)
                          {
                              for (int i = 1; i < Model.Articles.Count(); i++)
                              {
                        %>
                        <div class="item-cate">
                            <div class="list-bor">
                                <div class="avatar">
                                    <a href="/Article/Details/<%=Model.Articles[i].ID%>">
                                        <% string imgPath = (Model.Articles[i].ImagePath != null && Model.Articles[i].ImagePath != string.Empty) ? Model.Articles[i].ImagePath : VCC.Lib.Common.Globals.DefaultLogo; %>
                                        <img width="130px"  height="100px" alt="<%=Model.Articles[i].Title%>" title="<%=Model.Articles[i].Title%>" src="<%=imgPath%>" style="height: 100px; width: 130px">
                                    </a>
                                </div>
                                <div class="art-content">
                                    <div class="title-less">
                                        <h3>
                                            <a href="/Article/Details/<%=Model.Articles[i].ID%>">
                                                <%=Model.Articles[i].Title%></a></h3>
                                    </div>
                                    <div class="date date-first">
                                        <%=Model.Articles[i].AddDate != null ? (Model.Articles[0].AddDate.ToString("hh:mm") + "&nbsp;|&nbsp;" + Model.Articles[i].AddDate.ToString("dd/MM/yyyy")) : string.Empty%></div>
                                    <div class="lead">
                                        <%=Model.Articles[i].Summary%>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <%}
                  }
              } %>
                    </div>
                </div>
            </div>
            <div style="text-align: center" class="pagebarUTH fr">
                <% = Model.LanguageID == 1 ? "Trang" : "Page"%>
                <%= Model.Articles.PageNumber%>/<%= Model.Articles.PageCount%>
                <%= Html.Pager(Model.Articles.PageSize, Model.Articles.PageNumber, Model.Articles.TotalItemCount)%>
            </div>
            </form>
            <div class="clear"></div>
        </div>
        <div class="col_r">
        
        <%--<%Html.RenderPartial("~/Views/Shared/Hotline.ascx");%>
        
        <% Html.RenderAction("GetQuestion", "Article", new { catID = 3, number = 8 });%>
        
        <%Html.RenderAction("Getgallerybox", "Gallery");%>
        
        <%Html.RenderPartial("~/Views/Shared/FacebookFanpage.ascx");%>--%>
    </div>
    </div>
</asp:Content>
